Host container for render states for 3D rendering. More...
#include <kanzi/core.ui/graphics3d/render_entry_3d.hpp>
Classes | |
class | MorphHandles |
Cached morph handles. More... | |
Public Types | |
using | BindingRuntimeContainer |
Binding runtime container. | |
using | MorphHandlesPtr |
Unique pointer type for MorphHandles. | |
using | ReplacementBindingContainer |
Replacement binding container. | |
Public Types inherited from kanzi::VariableBindingHost | |
using | BindingRuntimeConstIterator |
Const iterator for binding runtimes. | |
using | BindingRuntimeContainer |
Binding runtime container. | |
using | BindingRuntimeIterator |
Iterator for binding runtimes. | |
using | BindingTargetMapping |
Binding target mapping. | |
Public Member Functions | |
MorphHandles & | acquireMorphHandles () |
Gets the morph handles structure. | |
void | applyFixedUniforms (Renderer3D &renderer) |
Apply fixed uniforms before rendering. | |
bool | applyRenderState (Renderer3D &renderer) |
Apply the internal render state for rendering. | |
void | bindGeometry (Renderer3D &renderer) |
Bind the contained geometry for rendering. | |
bool | bindRenderState (Renderer3D &renderer) |
Bind the contained render state for rendering. | |
size_t | getIndex () const |
Gets the associated index within the node. | |
MaterialSharedPtr | getMaterial () const |
Gets the associated material. | |
Mesh * | getMesh () const |
Gets the associated mesh. | |
Node3D * | getNode () const |
Gets the associated node. | |
RenderPass & | getRenderPass () |
Gets the associated node. | |
GlRenderState & | getRenderState () |
Gets the internal render state. | |
bool | matches (const Node3D &node, size_t clusterIndex, MaterialSharedPtr material, Mesh *mesh) |
Tests if the render entry matches given settings. | |
void | updateBindingsWithFixedUniformInputs () |
Execute all bindings needing manual execution. | |
Public Member Functions inherited from kanzi::VariableBindingHost | |
void | addAvailableVariableSource (AbstractBindingVariableSource &variableSource) |
Add a variable source to the list of available sources. | |
void | addBindingRuntime (AbstractBindingRuntimeSharedPtr bindingRuntime) |
Adds a binding runtime to the list of binding runtimes. | |
void | addVariableTarget (VariableBindingTargetRuntime &targetRuntime) |
Adds variable binding target runtime into the variable host. | |
BindingRuntimeIterator | beginBindingRuntimes () |
Gets an iterator to the beginning of binding runtimes. | |
BindingRuntimeConstIterator | beginBindingRuntimes () const |
Gets an iterator to the beginning of binding runtimes. | |
BindingRuntimeIterator | endBindingRuntimes () |
Gets an iterator to the end of binding runtimes. | |
BindingRuntimeConstIterator | endBindingRuntimes () const |
Gets an iterator to the end of binding runtimes. | |
BindingRuntimeIterator | endFixedRuntimes () |
Gets an iterator to the end of fixed binding runtimes. | |
BindingRuntimeConstIterator | endFixedRuntimes () const |
Gets an iterator to the end of fixed binding runtimes. | |
VariableBindingTargetRuntime * | getVariableBindingTargetRuntime (AbstractPropertyType propertyType) |
Gets an existing variable binding target runtime based on a property type. | |
void | removeAvailableVariableSource (AbstractBindingVariableSource &variableSource) |
Remove a variable source from the list of available sources. | |
void | removeBindingRuntime (AbstractBindingRuntime &bindingRuntime) |
Removes a binding runtime. | |
void | removeVariableTarget (VariableBindingTargetRuntime &targetRuntime) |
Removes a variable binding target from the variable host. | |
~VariableBindingHost () | |
Destructor. | |
Static Public Member Functions | |
static unique_ptr< RenderEntry3D > | create (RenderPass &renderPass, Node3D &node, size_t index, MaterialSharedPtr material, Mesh *mesh) |
Creates a new render entry. | |
Protected Member Functions | |
void | initializeRenderState (MaterialSharedPtr sharedMaterial) |
Initialize the internal state. | |
RenderEntry3D (RenderPass &renderPass, Node3D &node, size_t index, MaterialSharedPtr material, Mesh *mesh) | |
Constructor. | |
Protected Attributes | |
BindingRuntimeContainer::const_iterator | m_endFixedRuntimes |
Iterator to the binding runtimes, to the last place there are fixed operations. | |
size_t | m_index |
Source element (i.e. | |
Mesh * | m_mesh |
Mesh being rendered. | |
MorphHandlesPtr | m_morphHandles |
Morph handles for this render entry. | |
Node3D * | m_node |
Pointer to source node. | |
RenderPass & | m_renderPass |
Base render pass. | |
GlRenderState | m_renderState |
Contained render state. | |
Host container for render states for 3D rendering.
Used by render passes when drawing 3D objects. Contains the render state, references to associated node and render pass, and binding runtimes.
Unique pointer type for MorphHandles.
Binding runtime container.
Replacement binding container.
|
explicitprotected |
|
static |
void kanzi::RenderEntry3D::updateBindingsWithFixedUniformInputs | ( | ) |
Execute all bindings needing manual execution.
Used internally by the binding functions.
bool kanzi::RenderEntry3D::applyRenderState | ( | Renderer3D & | renderer | ) |
Apply the internal render state for rendering.
Used internally by the binding functions.
renderer | Renderer to use. |
void kanzi::RenderEntry3D::applyFixedUniforms | ( | Renderer3D & | renderer | ) |
Apply fixed uniforms before rendering.
Used internally by the binding functions.
renderer | Renderer to use. |
bool kanzi::RenderEntry3D::bindRenderState | ( | Renderer3D & | renderer | ) |
Bind the contained render state for rendering.
Applies any bindings needing manual execution, then binds the render state, then applies fixed uniforms. This does not bind the contained geometry for rendering.
renderer | Renderer to use. |
void kanzi::RenderEntry3D::bindGeometry | ( | Renderer3D & | renderer | ) |
Bind the contained geometry for rendering.
The contained render state should be bound before calling this function.
renderer | Renderer to use. |
bool kanzi::RenderEntry3D::matches | ( | const Node3D & | node, |
size_t | clusterIndex, | ||
MaterialSharedPtr | material, | ||
Mesh * | mesh ) |
|
inline |
Gets the associated node.
Returned render pass cannot be invalid, since the association is owned by it.
|
inline |
Gets the associated node.
|
inline |
Gets the associated index within the node.
|
inline |
Gets the associated material.
|
inline |
Gets the associated mesh.
|
inline |
Gets the internal render state.
|
inline |
Gets the morph handles structure.
If the structure does not exist, creates it.
|
protected |
Initialize the internal state.
Attach render state to material. Create binding runtimes for render value bindings and attach them.
sharedMaterial | Material to attach to. |
|
protected |
Base render pass.
The render pass owns the association, so this reference can never be invalid.
|
protected |
Pointer to source node.
If this pointer is marked as nullptr, the entry is invalid.
|
protected |
Source element (i.e.
cluster) index for the node. Each renderable element or cluster has its own render state association.
|
protected |
Mesh being rendered.
This member will be replaced with vertex- and index buffers and matrix palette in the future.
|
protected |
Morph handles for this render entry.
Kanzi creates the handles only if it renders the morph meshes using this entry.
|
protected |
Contained render state.
|
protected |
Iterator to the binding runtimes, to the last place there are fixed operations.